from typing import List

from pydantic import BaseModel

class UserBase(BaseModel):
    
    name: str
    phone: str
    roomnum: str
    remarks: str


class UserCreate(UserBase):
    facevalue: str
    imgbase64: str
    imgidx: int


class User(UserBase):
    id: int
    class Config:
        orm_mode = True

    
class EnterUserBase(BaseModel):
    name: str
    phone: str
    roomnum: str
    entertemp: str
    remarks: str
    desc: str

class EnterUserCreate(EnterUserBase):
    pass

class EnterUser(EnterUserBase):
    id: int
    entertime: str
    class Config:
        orm_mode = True

class DormitoryBase(BaseModel):
    name: str
    phone: str
    dornum: str
    remarks: str

class DormitoryCreate(DormitoryBase):
    password: str

class Dormitory(DormitoryBase):
    id: int
    class Config:
        orm_mode = True

